<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:html="http://www.w3.org/1999/xhtml">
<head>
	<title>How does :first-of-type determine type?</title>
	<style type="text/css">

	div > *|* { display: block; color: black; border: thin solid; margin: 1em; }
	div > *|*:first-of-type { background:lime; }

	</style>
</head>
<body>

<h1>How does :first-of-type determine type?</h1>

<p>Following are a series of elements inside a div.  Which match
:first-of-type (and thus have a lime background)?</p>

<div>

<p>(1) This is a <code>p</code> element in the HTML namespace.  It should definitely match.</p>
<p>(2) This is a second <code>p</code> element in the HTML namespace.  It should definitely NOT match.</p>
<html:p>(3) This is an <code>html:p</code> element in the HTML namespace.</html:p>
<p xmlns="http://www.example.com/ns">(4) This is a <code>p</code> element in the <code>http://www.example.com/ns</code> namespace.</p>
<p xmlns="">(5) This is a <code>p</code> element in no namespace.</p>

</div>

<p>If type refers to the <a href="http://www.w3.org/TR/REC-xml-names/#dt-expname">expanded name</a>, then (1), (4), and (5) should be green.  (But if <code>xmlns=""</code> is not supported, (5) will not be green.)</p>

<p>If type refers to the <a href="http://www.w3.org/TR/REC-xml-names/#dt-localname">local name</a>, then (1) should be green.</p>

<p>If type refers to the <a href="http://www.w3.org/TR/REC-xml-names/#dt-qualname">qualified name</a> then (1) and (3) should be green.</p>

</body>
</html>

